home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / pas_all.zip / TI245.ASC < prev    next >
Text File  |  1992-01-20  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  9.                                                               : 245
  10.   VERSION : 1.00A
  11.        OS : PC-DOS
  12.      DATE : March 13, 1986                               PAGE : 1/2
  13.   TITLE  :  FILE TRUNCATION UPDATE FROM VERSION 1.00A TO 1.00TB
  14.  
  15.  
  16.  
  17.  
  18.   The changes to the Turbo Editor Toolbox described in this handout
  19.   prevent the truncation of files when they are read from disk. The
  20.   Reset procedure in Turbo Pascal 3.0 provides a second optional
  21.   parameter that defines the size of a block when using un
  22.  
  23.     The routine to be modified is called:
  24.  
  25.        procedure EditReatxtfil (Fn : Varstring);
  26.  
  27.     This routine exists in two files:
  28.  
  29.       KCMD.MS, on the MicroStar Source diskette
  30.       USER.ED,  on  the  .COM Files,  Turbo Editor Toolbox
  31.       SOURCE      diskette
  32.  
  33.   The modified lines of code are listed in the routine below
  34.   with a comment at the end of the line: { Ver. 1.00B - ... }. The
  35.   comment indicates when the code is an addition, a deletion, or a
  36.   modification. Please note that there is only one line to be
  37.   deleted!
  38.  
  39.   NOTES:
  40.  
  41.   1.   These modifications will update Turbo Editor Toolbox to
  42.        version 1.00B. Therefore, you need to update the version
  43.        numbers of the files: MS.PAS, FIRST-ED.PAS, USER.ED and
  44.        KCMD.MS. Also, update the copy-right message for MicroStar
  45.        in MS.PAS.
  46.  
  47.   2.   Make these modifications on a COPY of the master  diskettes,
  48.        do NOT modify your master diskettes.
  49.  
  50.   The following are step-by-step instructions for making the
  51.   modifications:
  52.  
  53.   1.   Load the file USER.ED into the Turbo Pascal editor.
  54.   2.   At the bottom of the variable declaration section add a
  55.        variable of type real:
  56.  
  57.            Textsave   : Plinedesc;
  58.            Filnam     : String80;
  59.            Buffer     : array [1..Bufsize] of char;
  60.            x          : real;      { Ver. 1.00B - Addition }
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  75.                                                               : 245
  76.   VERSION : 1.00A
  77.        OS : PC-DOS
  78.      DATE : March 13, 1986                               PAGE : 2/2
  79.   TITLE  :  FILE TRUNCATION UPDATE FROM VERSION 1.00A TO 1.00B
  80.  
  81.  
  82.  
  83.  
  84.   3.   Modify the call to Turbo Pascal's procedure Reset:
  85.            Change From:
  86.              Reset (Infile);
  87.            To:
  88.              Reset (Infile,1);        { Ver. 1.00B - Modification }
  89.  
  90.   4.   Add a line immediately following the call to Reset:
  91.             .
  92.             .
  93.          begin {Reatxtfil}
  94.            Assign (Infile, Fn);
  95.            Reset (Infile,1);          { Ver. 1.00B - Modification }
  96.            x := longfilesize(InFile); { Ver. 1.00B - Addition     }
  97.  
  98.   5.   Modify the If-Then statement:
  99.            Change From:
  100.              if Pointer > (Nrecsread * 128) then
  101.              begin
  102.                Blockread (Infile, Buffer, Bufsize div 128, Nrecsread);
  103.                         { above  is the single line  to be deleted }
  104.            To:
  105.              if Pointer > Nrecsread then
  106.              begin                   { Ver. 1.00B - Modification }
  107.                if x > BufSize then   {Need to load another buffer full}
  108.                begin                 { Ver. 1.00B - addition }
  109.                  Blockread (Infile, Buffer, Bufsize, Nrecsread);
  110.                  x := x - BufSize;   { Ver. 1.00B - addition }
  111.                end
  112.                else                  { Ver. 1.00B - addition }
  113.                                      { Ver. 1.00B - addition }
  114.                  Blockread (Infile, Buffer, trunc(x), Nrecsread);
  115.  
  116.   6.   Load the file KCMD.MS into the Turbo Pascal editor.
  117.   7.   Repeat steps 2 through 6
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.